package com.jcfk.eam.dao.base;

import com.jcfk.common.business.dao.BaseDao;
import com.jcfk.common.web.domain.DataPage;
import com.jcfk.common.web.domain.RetResult;
import com.jcfk.eam.domain.dto.main.RepairOrderSummaryDTO;
import com.jcfk.eam.domain.po.base.EamRepairOrder;
import com.jcfk.eam.domain.query.base.EamRepairOrderQuery;
import com.jcfk.eam.domain.dto.base.EamRepairOrderDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 维修单
 *
 * @author awei
 * @email 522891237@gqq.com
 * @date 2024-08-26
 */
@Repository
public interface EamRepairOrderDao extends BaseDao<EamRepairOrder> {
    /**
     * 维修单分页查询
     *
     * @param page
     * @param query
     * @return
     */
    DataPage<EamRepairOrderDTO> queryByPage(@Param("page") DataPage<EamRepairOrderDTO> page, @Param("query") EamRepairOrderQuery query);

    /**
     * 分页查询备件使用统计
     *
     * @param page
     * @param query
     * @return
     */
    DataPage<EamRepairOrderDTO> queryUsageStatistics(@Param("page") DataPage<EamRepairOrderDTO> page, @Param("query") EamRepairOrderQuery query);

    /**
     * 获取维修工单汇总
     * @param repairOrderQuery
     * @return
     */
    RepairOrderSummaryDTO getRepairOrderSummary(@Param("query") EamRepairOrderQuery repairOrderQuery);

    /**
     * 分页查询我的维修单
     * @param page
     * @param query
     * @return
     */
    DataPage<EamRepairOrderDTO> queryMyRepairOrder(@Param("page") DataPage<EamRepairOrderDTO> page, @Param("query") EamRepairOrderQuery query);

    /**
     * 获取我的维修汇总
     * @param repairOrderQuery
     * @return
     */
    RepairOrderSummaryDTO getMyRepairOrderSummary(@Param("query") EamRepairOrderQuery repairOrderQuery);

}
